AMD AES Encryption Module Interface

** DESCRIPTION **

The AES encryption module provides two paths for a user application to perform
an encryption or decryption operation. 

Asynchronous operations can be performed via write() and read() operations
through the device file.  These are considered to be asynchronous, because the
user can go off and do other things while waiting for the encryption to return.

Synchronous methods are prompted via an ioctl() call (see below), and wait for
the result to be calculated. 

Both methods use the key specified by the AES_IOCTL_SETKEY ioctl() call.

** IOCTL **

-----------------------------
AES_IOCTL_SETMODE (0x01)
-----------------------------

Arguments: 

AES_MODE_ENCRYPT (0x01)
AES_MODE_DECRYPT (0x02)

Description:

Set the appropriate mode for subsequent asynchronous operations.

-----------------------------
AES_IOCTL_SETKEY (0x02)
-----------------------------

Argument:  
16 byte AES key

Description:
Set the AES key for subsequent operations (both synchronous and asynchronous)

-----------------------------
AES_IOCTL_ENCRYPT (0x03)
AES_IOCTL_DECRYPT (0x04)
-----------------------------

Arguments:

struct aes_operation {
       unsigned long src;
       unsigned long dst;
       int len;
}

Description:

Perform a synchronous encryption or decryption operation.  The argument
is the aes_operation structure, where src is the address of the source block,
dst is the address of the destination block, and len is the size of the block.
(padded to 16 byte intervals).	

-----------------------------
AES_IOCTL_SET_COHERENCY (0x05)
-----------------------------

Arguments:

true (1) or false (0)

Description:

Determine if the AES module should perform its own cache coherency,
or if it should be left to the driver to flush the cache.





